<template>
  <van-tabbar v-model="active" active-color="#000" inactive-color="#000">
    <van-tabbar-item icon="wap-home" @click="fun">首页</van-tabbar-item>
    <van-tabbar-item icon="shop-collect" @click="fun1">分类</van-tabbar-item>
    <van-tabbar-item icon="shopping-cart" @click="fun2">购物车</van-tabbar-item>
    <van-tabbar-item icon="manager" @click="fun3">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    };
  },
  methods: {
    //首页点击回到主页
    fun() {
        // this.$router.push({
        //     path:"/MyHome"
        // },()=>{})
    },
    //分类点击跳到分类
    fun1() {
        this.$router.push({
            path:"/ClassifyPage"
        },()=>{})
    },
    //购物车点击跳购物车
    fun2() {
        this.$router.push({
            path:"/ShoppingCart"
        },()=>{})
    },
    //我的点击跳个人主页，未登录跳不到
    fun3() {
      
    },
  },
};
</script>

<style>
</style>